<?php
/*
* Author: Nguyen Hai Nam
* Module: GroupHistoryModule
* Desc	: "This module contain history new of terraco group"
* Date	: 12/12/2011
*/
class GroupHistoryModule extends Pick_Core_Module{
	function GroupHistoryModule(){
		parent::Pick_Core_Module();
		# Languages
		$languages = new Pick_Core_Languages();
		$objectLanguages = "";
		$objectLanguages = $languages->getObjects(1, 'status = 1', array('position'=>'ASC'), '');
		if($objectLanguages){
			$objectLanguages = $objectLanguages['data'];	
		}#endif
		$this->template->assign("objectLanguages", $objectLanguages);
	}
	public function getContent(){

		$newscategory = new Pick_Dao_NewsCategory();
		$news = new Pick_Dao_News();
		$arrGroupHistory = "";
		$objCategory = $newscategory->getObjectFromSlug('group-history');
		if(is_object($objCategory)){
            $arrGroupHistory = $news->getObjectsFromCId(1, $objCategory->getField('id'));
		}
        if(isset($arrGroupHistory['data'])){
        	$arrGroupHistory = $arrGroupHistory['data'];
        }
		$slug = $this->request->get('slug', 'group-history');
		$this->template->assign('arrGroupHistory', $arrGroupHistory);
		$this->template->assign('slug', $slug);

	}
}